package com.igeek.datasource;

import com.alibaba.druid.pool.DruidDataSource;
import org.apache.ibatis.datasource.unpooled.UnpooledDataSourceFactory;

import java.sql.ResultSet;

public class DruidDataSourceFactory extends UnpooledDataSourceFactory {


    /**
     * 在构造方法中将默认的dataSource替换为DruidDataSource
     */
    public DruidDataSourceFactory(){
        DruidDataSource druidDataSource = new DruidDataSource();
        //替换连接池
        this.dataSource = druidDataSource;
    }
}
